<?php
/** Dados da base de dados **/
define('DBWP',       'avptdev');
define('USERWP',     'root');
define('PASSWORDWP', '');
define('HOSTWP',     'localhost');

/** Dados da base de dados on **/
//define('DBWP',       'forumave_avesptwordpress');
//define('USERWP',     'forumave_wp');
//define('PASSWORDWP', 'XOb[IP2SM@E^');
//define('HOSTWP',     'localhost');

class ConexaoWP {	

	private static $instancia;
	private $db;

	private function Conexao(){}

	public static function getConexao(){
		if(is_null(self::$instancia)){
			self::$instancia = new ConexaoWP();
		}
		return self::$instancia;
	}

	public function Conectar(){
		$this->db = new PDO('mysql:host='.HOST.';port=3306;dbname='.DBWP, USERWP, PASSWORDWP, array(PDO::ATTR_PERSISTENT => true));
		return $this->db;
	}
}
?>